From 226f6f8faefc49140279769b608bf5c546154a79 Mon Sep 17 00:00:00 2001 From: =?utf8?q?IOhannes=20m=20zm=C3=B6lnig?= Date: Wed, 10 Feb 2016 16:46:47 +0100 Subject: [PATCH] make introjucer produce nicer makefiles --- debian/patches/introjucer-makegenerator.patch | 121 ++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 debian/patches/introjucer-makegenerator.patch diff --git a/debian/patches/introjucer-makegenerator.patch b/debian/patches/introjucer-makegenerator.patch new file mode 100644 index 00000000..560f1a4f --- /dev/null +++ b/debian/patches/introjucer-makegenerator.patch @@ -0,0 +1,121 @@ +Description: introjucer fixes + introjucer creates Linux Makefiles, but they do silent builds and do not allow + to override CPP/C/CXXFLAGS. + this patch changes introjucer to honor the "V" build variable, so "V=1" will + build verbosely. + it also renames *FLAGS to JUCE_*FLAGS and appends the ordinary *FLAGS to them. +Author: IOhannes m zmölnig +Origin: Debian +Last-Update: 2015-02-10 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- "juce.orig/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_Make.h" ++++ "juce/extras/Introjucer/Source/Project Saving/jucer_ProjectExport_Make.h" +@@ -169,15 +169,16 @@ + + void writeCppFlags (OutputStream& out, const BuildConfiguration& config) const + { +- out << " CPPFLAGS := $(DEPFLAGS)"; ++ out << " JUCE_CPPFLAGS := $(DEPFLAGS)"; + writeDefineFlags (out, config); + writeHeaderPathFlags (out, config); +- out << newLine; ++ out << " $(CPPFLAGS)" ++ << newLine; + } + + void writeLinkerFlags (OutputStream& out, const BuildConfiguration& config) const + { +- out << " LDFLAGS += $(TARGET_ARCH) -L$(BINDIR) -L$(LIBDIR)"; ++ out << " JUCE_LDFLAGS += $(TARGET_ARCH) -L$(BINDIR) -L$(LIBDIR)"; + + { + StringArray flags (makefileExtraLinkerFlags); +@@ -207,7 +208,8 @@ + if (libraries.size() != 0) + out << " -l" << replacePreprocessorTokens (config, libraries.joinIntoString (" -l")).trim(); + +- out << " " << replacePreprocessorTokens (config, getExtraLinkerFlagsString()).trim() ++ out << " " << replacePreprocessorTokens (config, getExtraLinkerFlagsString()).trim(); ++ out << " $(LDFLAGS)" + << newLine; + } + +@@ -236,7 +238,7 @@ + + writeCppFlags (out, config); + +- out << " CFLAGS += $(CPPFLAGS) $(TARGET_ARCH)"; ++ out << " JUCE_CFLAGS += $(JUCE_CPPFLAGS) $(TARGET_ARCH)"; + + if (config.isDebug()) + out << " -g -ggdb"; +@@ -246,6 +248,7 @@ + + out << " -O" << config.getGCCOptimisationFlag() + << (" " + replacePreprocessorTokens (config, getExtraCompilerFlagsString())).trimEnd() ++ << " $(CFLAGS)" + << newLine; + + String cppStandardToUse (getCppStandardString()); +@@ -253,8 +256,9 @@ + if (cppStandardToUse.isEmpty()) + cppStandardToUse = "-std=c++11"; + +- out << " CXXFLAGS += $(CFLAGS) " ++ out << " JUCE_CXXFLAGS += $(JUCE_CFLAGS) " + << cppStandardToUse ++ << " $(CXXFLAGS)" + << newLine; + + writeLinkerFlags (out, config); +@@ -273,7 +277,7 @@ + if (projectType.isStaticLibrary()) + out << " BLDCMD = ar -rcs $(OUTDIR)/$(TARGET) $(OBJECTS)" << newLine; + else +- out << " BLDCMD = $(CXX) -o $(OUTDIR)/$(TARGET) $(OBJECTS) $(LDFLAGS) $(RESOURCES) $(TARGET_ARCH)" << newLine; ++ out << " BLDCMD = $(CXX) -o $(OUTDIR)/$(TARGET) $(OBJECTS) $(JUCE_LDFLAGS) $(RESOURCES) $(TARGET_ARCH)" << newLine; + + out << " CLEANCMD = rm -rf $(OUTDIR)/$(TARGET) $(OBJDIR)" << newLine + << "endif" << newLine +@@ -297,6 +301,14 @@ + << "# Don't edit this file! Your changes will be overwritten when you re-save the Introjucer project!" << newLine + << newLine; + ++ out << "# build with \"V=1\" for verbose builds" << newLine ++ << "ifeq ($(V), 1)" << newLine ++ << "V_AT =" << newLine ++ << "else" << newLine ++ << "V_AT = @" << newLine ++ << "endif" << newLine ++ << newLine; ++ + out << "# (this disables dependency generation if multiple architectures are set)" << newLine + << "DEPFLAGS := $(if $(word 2, $(TARGET_ARCH)), , -MMD)" << newLine + << newLine; +@@ -319,12 +331,12 @@ + << "\t-@mkdir -p $(BINDIR)" << newLine + << "\t-@mkdir -p $(LIBDIR)" << newLine + << "\t-@mkdir -p $(OUTDIR)" << newLine +- << "\t@$(BLDCMD)" << newLine ++ << "\t$(V_AT)$(BLDCMD)" << newLine + << newLine; + + out << "clean:" << newLine + << "\t@echo Cleaning " << projectName << newLine +- << "\t@$(CLEANCMD)" << newLine ++ << "\t$(V_AT)$(CLEANCMD)" << newLine + << newLine; + + out << "strip:" << newLine +@@ -342,8 +354,8 @@ + << ": " << escapeSpaces (files.getReference(i).toUnixStyle()) << newLine + << "\t-@mkdir -p $(OBJDIR)" << newLine + << "\t@echo \"Compiling " << files.getReference(i).getFileName() << "\"" << newLine +- << (files.getReference(i).hasFileExtension ("c;s;S") ? "\t@$(CC) $(CFLAGS) -o \"$@\" -c \"$<\"" +- : "\t@$(CXX) $(CXXFLAGS) -o \"$@\" -c \"$<\"") ++ << (files.getReference(i).hasFileExtension ("c;s;S") ? "\t$(V_AT)$(CC) $(JUCE_CFLAGS) -o \"$@\" -c \"$<\"" ++ : "\t$(V_AT)$(CXX) $(JUCE_CXXFLAGS) -o \"$@\" -c \"$<\"") + << newLine << newLine; + } + } -- 2.30.2